package cn.zzuisa.bluebox.biz.device.request;

import java.time.LocalDateTime;

import javax.validation.constraints.NotNull;

import com.baomidou.mybatisplus.annotation.TableField;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 授权信息
 * </p>
 *
 * @author Ao
 * @since 2018-12-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Authority对象", description="授权信息")
public class AuthorityRequest {

    @ApiModelProperty(value = "到期时间，为空则不限制")
    @TableField("expireTime")
    private LocalDateTime expireTime;


    @ApiModelProperty(value = "被授权者")
    @NotNull(message = "被授权者不能为空")
    private Long []authorizeders;

    @ApiModelProperty(value = "授权者")
    private Long authorizeer;

    @ApiModelProperty(value = "锁的ID")
    @TableField("deviceId")
    @NotNull(message = "所选设备不能为空")
    private Long []deviceIds;

    @ApiModelProperty(value = "授权名称")
    private String authorityName;

    @ApiModelProperty(value = "授权类型")
    private String authorityType;
    private Long deviceId;

    @ApiModelProperty(value = "是否限时：0为不限，1为限制")
    private Integer isLimitExpire;
}
